{% extends 'base.html' %}
{% load static %}
{% block title %}课程讲师 - 在线教育网{% endblock %}

{% block content %}
    <section>
        <div class="wp">
            <ul  class="crumbs">
                <li><a href="/">首页</a>></li>
                <li>课程讲师</li>
            </ul>
        </div>
    </section>

    <section>
        <div class="wp butler_list_box list">
            <div class='left'>
                <div class="butler_list layout">
                    <div class="head">
                        <ul class="fl tab_header">
                            <li {% if sort == '' %}class="active"{% endif %}><a href="?sort=">全部</a> </li>
                            <li {% if sort == 'click_num' %}class="active"{% endif %}><a href="?sort=click_num">人气 &#8595;</a></li>
                        </ul>
                        <div class="fr butler-num">共<span class="key">9</span>人&nbsp;&nbsp;&nbsp;</div>
                    </div>
                    {% for teacher in pages %}
                        <dl class="des">
                            <dt>
                                <a href="{% url 'orgs:teacher_detail' teacher.id %}">
                                    <div class="picpic">
                                        <img width="100" height="100" class="scrollLoading" src="{{ MEDIA_URL }}{{ teacher.image }}"/>
                                    </div>
                                </a>
                                <div class="btn">
                                    <div class="fr btn2 bdsharebuttonbox">
                                        <span class="fl">分享</span>
                                        <a href="#" class="bds_more" data-cmd="more"></a>
                                    </div>
                                </div>
                            </dt>
                            <dd>
                                <a href="{% url 'orgs:teacher_detail' teacher.id %}">
                                    <h1>{{ teacher.name }}<span class="key picbig">金牌讲师</span></h1>
                                </a>
                                <ul class="cont">
                                    <li>工作年限：<span>{{ teacher.work_year }}年</span></li>
                                    <li>工作职位：<span>{{ teacher.work_position }}</span></li>
                                    <li>就职公司：<span>{{ teacher.org.name }}</span></li>
                                    <li>年龄：<span>{{ teacher.age }}岁</span></li>
                                    <li>教学特点：<span>{{ teacher.work_style }}</span></li>
                                </ul>
                            </dd>
                            <a class="buy buyservice" href="{% url 'orgs:teacher_detail' teacher.id %}"><br/>查看<br/>详情</a>
                        </dl>
                    {% endfor %}


                </div>
                <div class="pageturn">
                    <ul class="pagelist">
                        {% if pages.has_previous %}
                        <li class="long"><a href="?page={{ pages.previous_page_number }}&sort={{ sort }}">上一页</a></li>
                        {% endif %}
                        {% for num in pages.paginator.page_range %}
                        <li {% if num == pages.number %}class="active"{% endif %}><a href="?page={{ num }}&sort={{ sort }}">{{ num }}</a></li>
                        {% endfor %}
                        {% if pages.has_next %}
                        <li class="long"><a href="?page={{ pages.next_page_number }}&sort={{ sort }}" class="page">下一页</a></li>
                        {% endif %}

                    </ul>
                </div>
            </div>
            <div class="right layout">
                <div class="head">讲师排行榜</div>
                    {% for teacher in recommend %}
                    <dl class="des">
                        <span class="num fl">1</span>
                        <a href="{% url 'orgs:teacher_detail' teacher.id %}">
                            <dt>
                                <img width="50" height="50" class="scrollLoading"  src="{{ MEDIA_URL }}{{ teacher.image }}"/>
                            </dt>
                        </a>
                        <dd>
                            <a href="{% url 'orgs:teacher_detail' teacher.id %}">
                                <h1 title="weesmile">{{ teacher.name }}</h1>
                            </a>
                            <p>工作年限：<span>{{ teacher.work_year }}年</span></p>
                        </dd>
                    </dl>
                    {% endfor %}
            </div>
        </div>
    </section>
{% endblock %}
